package com.medical.manage.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("t_advice")
public class Advice {
    //病友圈建议id
    @TableId(type = IdType.AUTO)
    private Integer adviceId;
    //用户id
    private Long userId;
    //病友圈id
    private Integer articleId;
    //建议内容
    private String content;
    //创建时间
    @TableField(fill = FieldFill.INSERT) // 创建时自动填充
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE) // 创建和修改时自动填充
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    //修改人
    private String updatePerson;
    //状态(0:未采纳，1：已采纳)
    private Integer state;

}